package com.ssm.Controllers;

import com.ssm.Entities.Student;
import com.ssm.Services.StudentService;
import com.ssm.Services.StudentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController {

    @Autowired
    private StudentService studentService;
    @RequestMapping("/student")
    @ResponseBody
    public Student getStudent(HttpServletRequest request){
//        String id = request.getParameter("id");
        String id = "112";
        String sid = "112";
        String sidaaa = "112";
        Integer intId = Integer.parseInt(id);
        String name = "aaa";
        return studentService.getStudent(intId);
//        return null;
    }
}
